/**
 * Copyright 2009 Adam Ruggles.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.google.code.sapien.dao;

import java.util.List;

import com.google.code.sapien.dao.jpa.PersistentLoginJpaDAO;
import com.google.code.sapien.model.PersistentLogin;
import com.google.code.sapien.model.User;
import com.google.inject.ImplementedBy;

/**
 * Interface for Persistent Login Data Access Objects.
 * @author Adam
 * @version $Id: PersistentLoginDAO.java 23 2009-05-12 04:28:58Z a.ruggles $
 * 
 * Created on Apr 27, 2009 at 9:51:06 AM 
 */
@ImplementedBy(PersistentLoginJpaDAO.class)
public interface PersistentLoginDAO extends EntityDAO<PersistentLogin> {

	/**
	 * Returns a list of persistent logins for a user.
	 * @param user The user.
	 * @return A list of persistent logins by user.
	 */
	List<PersistentLogin> list(User user);

	/**
	 * Returns a persistent login by user and token.
	 * @param user The user.
	 * @param token The token.
	 * @return A persistent login by user and token.
	 */
	PersistentLogin get(User user, String token);
}
